# $Id: PKGBUILD 182614 2013-04-11 09:00:27Z schiv $
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: SpepS <dreamspepser at yahoo dot it>
# Contributor: see .contrib

pkgname=ardour
_pkgname=Ardour3
pkgver=3.1
pkgrel=1
pkgdesc="Professional-grade digital audio workstation"
arch=('i686' 'x86_64')
url="http://ardour.org/"
license=('GPL')
depends=('liblrdf' 'liblo' 'libsmf' 'lilv>=0.16.0'
         'aubio' 'libgnomecanvasmm' 'suil>=0.6.12')
makedepends=('python2' 'boost' 'cppunit' 'doxygen' 'graphviz')
install=$pkgname.install
source=("ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.bz2"
        "$pkgname.desktop")
md5sums=('6291ee6e6519a801a6c7255eb005895f'
         '316bd21ece5e2208a104fd09cac521af')

prepare() {
  cd "$srcdir/$_pkgname-$pkgver"

  # python2 fix
  sed -i 's/python ${SRC}/python2 ${SRC}/' libs/pbd/wscript
}

build() {
  cd "$srcdir/$_pkgname-$pkgver"

  python2 waf configure --prefix=/usr \
                        --configdir=/etc \
                        --docs

  python2 waf build $MAKEFLAGS
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"

  python2 waf install --destdir="$pkgdir"

  # install some freedesktop.org compatibility
  install -Dm644 "$srcdir/$pkgname.desktop" \
    "$pkgdir/usr/share/applications/$pkgname.desktop"
}

# vim:set ts=2 sw=2 et:
